package com.zdb.personal.controller;

import com.zdb.personal.po.ZdbCommonDistrictPo;
import com.zdb.personal.service.ZdbCommonDistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 地区
 */
@RestController
@RequestMapping("/district")
public class ZdbCommonDistrictController {
    //地区表
    @Autowired
    private ZdbCommonDistrictService districtService;

    /**
     * 根据id查询对应的地区
     * @param id
     * @return
     */
    @RequestMapping(value = "/queryByIdDistrict/{id}")
    public ZdbCommonDistrictPo queryByIdDistrict(@PathVariable("id")int id){
        return this.districtService.getById(id);
    }

}


